package com.yaoying.mya;

import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.RecyclerView;

import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.SurfaceView;
import android.view.View;
import android.widget.AbsoluteLayout;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RadioButton;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.SearchView;
import android.widget.TableLayout;
import android.widget.TextView;

public class ActivityA extends AppCompatActivity {

    private static final String TAG = ActivityA.class.getName().toString();
    TextView textView;
    EditText editText;
    Button button;
    CheckBox checkBox;
    RadioButton radioButton;
    ImageView imageView;
    RelativeLayout relativeLayout;
    FrameLayout frameLayout;
    LinearLayout linearLayout;
    TableLayout tableLayout;
    AbsoluteLayout absoluteLayout;
    ConstraintLayout constraintLayout;
    ListView listView;
    RecyclerView recyclerView;
    ScrollView scrollView;
    SurfaceView surfaceView;
    SearchView searchView;
RecyclerView.ViewHolder viewHolder;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void onClickToB(View view) {
        Intent intent = new Intent(this, ActivityB.class);
        startActivity(intent);
    }

    public void onClickToC(View view) {
        Intent intent = new Intent(this, ActivityC.class);
        startActivity(intent);
    }

    public void onPopDialog(View view) {
        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setTitle("温馨提示");
        builder.setMessage("ni hao a ");
        builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialogInterface, int i) {
                Log.d(TAG, "onClick: " + "---取消-------");
            }
        });
        builder.setPositiveButton("确定", null);
        AlertDialog alertDialog = builder.create();
        alertDialog.show();

    }
}